package org.lex.ftplist.ui;

import javax.swing.JInternalFrame;

import org.lex.ftplist.core.FtpUrl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ApplicationOperator {

	private Logger log = LoggerFactory.getLogger(getClass());

	public FtpUrl askUserFtpUrl() {
		OpenFtpDialog d = new OpenFtpDialog();
		d.setVisible(true);
		FtpUrl u = d.getUrl();
		log.info("url=" + u);
		return u;
	}

	public void addInternalFrame(JInternalFrame frame) {
		getApp().getDesktopPane().add(frame);
		frame.setVisible(true);
	}

	public FLApplication getApp() {
		return FLApplication.getInstance();
	}

	ApplicationOperator() {
	}
}
